import VueRouter from 'vue-router'
// 导入组件
import Home from './components/tabbar/Home.vue'
import Member from './components/tabbar/Member.vue'
import Shopcar from './components/tabbar/Shopcar.vue'
import Search from './components/tabbar/Search.vue'
import Newslist from './components/news/Newslist.vue'
var router = new VueRouter({
  routes: [ // 配置路由规则
    {path:'/',redirect:'/home'},//路由重定向，当为根路径时，默认打开首页
    {path: '/home',component:Home},
    {path: '/member',component:Member},
    {path: '/shopcar',component:Shopcar},
    {path: '/search',component:Search},
    {path: '/home/newslist',component:Newslist},
    
  ],
  linkActiveClass:'mui-active' //覆盖默认的路由高亮的类 :router-link-active
})

// 把路由对象暴露出去
export default router